package com.txd.mofa.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.txd.mofa.R;

import java.util.Map;

public class JubaoAdapter extends BaseQuickAdapter<Map<String,String>, BaseViewHolder> {
    public JubaoAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, Map<String, String> item) {

        TextView tv = helper.getView(R.id.tv);

        tv.setText(item.get("report_title"));

        if (item.get("flag").equals("1")){
            tv.setTextColor(mContext.getResources().getColor(R.color.hui));
        }else {
            tv.setTextColor(mContext.getResources().getColor(R.color.huang));
        }
    }
}
